package com.ssy.lingxi.member.merchant.api.constant;

import com.ssy.lingxi.common.language.LanguageHolder;

/**
 * 会员权益类型枚举
 */
public enum MemberRightTypeEnum {

    /**
     * 价格权益 - 1
     */
    PRICE_RIGHT(1, "价格权益", "交易一方能获得另一方的价格折扣"),

    /**
     * 返现权益 - 2
     */
    RETURN_MONEY_RIGHT(2, "返现权益", "交易一方能获得另一方的交易返现"),

    /**
     * 积分权益 - 3
     */
    SCORE_POINTS_RIGHT(3, "积分权益", "交易一方能获得另一方的积分");

    private Integer code;

    MemberRightTypeEnum(Integer code, String message, String remark) {
        this.code = code;
    }

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return LanguageHolder.getName(this.getClass(), this.getCode());
    }

    public String getRemark() {
        String key = "MemberRightTypeEnum.r.".concat(String.valueOf(this.getCode()));
        return LanguageHolder.getName(key);
    }

    public static String getCodeMsg(Integer code) {
        return LanguageHolder.getName(MemberRightTypeEnum.class, code);
    }

    public static String getRemark(Integer code) {
        return LanguageHolder.getName("MemberRightTypeEnum.r.".concat(String.valueOf(code)));
    }
}
